package com.yand.thread.rabbitRun;


/**
 * 抽象的动物类
 */
public abstract class Animal extends Thread{

    public int length = 20;// 比赛长度
    public abstract void runing();

    @Override
    public void run() {
        super.run();
        while (length > 0) {
            runing();
        }
    }
    // 2.创建接口对象
    public Calltoback calltoback;

    interface Calltoback {

        void win();
    }
}
